home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
DATABASE.DIR
/
00114_Script_RECENT CHOICES
< prev
next >
Wrap
Text File
|
1996-03-28
|
1KB
|
43 lines
-- ---------------------------------------------------------------
-- Handler resetRecentChoices
on resetRecentChoices
global recentChoices
set recentChoices = []
end
-- ---------------------------------------------------------------
-- Handler updateRecentChoices adds the last selection to the
-- global variable last5
on updateRecentChoices
global recentChoices, clickedTopic, numRecent
-- this first check is because clickedtopic is void
-- before they click anything
if not(voidP(clickedTopic)) then
if count(recentChoices) = numRecent then
deleteAt(recentChoices, 1) -- delete oldest choice
append recentChoices, clickedTopic -- add most recent choice
else
append recentChoices, clickedTopic -- add most recent choice
end if
end if
end
-- ---------------------------------------------------------------
-- Handler goRecentChoice takes the user back to the last choice
on goRecentChoice
global recentChoices, clickedTopic, numRecent
set numChosen = count(recentChoices)
if (numChosen > 0) then
set clickedTopic = getAt(recentChoices,numChosen) -- get most recent
deleteAt(recentChoices, numChosen) -- delete most recent
showTopicText -- show most recent
end if
end